﻿using System;
using UnityEngine;

namespace TC
{
    public abstract class GraphSurface : Surface
    {
        // 不同类型的图，都可以与TreeView交互
        public virtual void NodeMenuEventHandler(Vector2 position, Type nodeType, ValueWrap contextVar = default) { }
    }
    
    public abstract class GraphSurface<T> : GraphSurface, IEntity<T> where T : Graph
    {
        public T target { get; private set; }

        public GraphSurface(T target)
        {
            this.target = target;
        }

        public override void MouseMoveEventHandler()
        {
            base.MouseMoveEventHandler();
            Event.current.Use(); //提升性能，避免无畏的检查
        }
    }
}